class UnSafeActModel {
  String? code;
  String? name;
  String? deviceCode;
  String? deviceName;
  String? color;
  String? photo;
  int? val;
  DateTime? portalAt;

  UnSafeActModel(
      {this.code,
      this.name,
      this.deviceCode,
      this.deviceName,
      this.color,
      this.photo,
      this.val,
      this.portalAt});

  UnSafeActModel.fromJson(Map<String, dynamic> json) {
    code = json['code'];
    name = json['name'];
    deviceCode = json['deviceCode'];
    deviceName = json['deviceName'];
    color = json['color'];
    photo = json['photo'];
    val = json['val'];
    portalAt =
        json['portalAt'] != null ? DateTime.tryParse(json['portalAt']) : null;
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['code'] = this.code;
    data['name'] = this.name;
    data['deviceCode'] = this.deviceCode;
    data['deviceName'] = this.deviceName;
    data['color'] = this.color;
    data['photo'] = this.photo;
    data['val'] = this.val;
    data['portalAt'] = this.portalAt;
    return data;
  }
}
